{include file="public/header" /}
  <body>
    <div class="x-body">
        <form  class="layui-form">
          <div class="layui-form-item">
              <label for="drawing_Internal_id" class="layui-form-label">内部编号</label>
              <div class="layui-input-inline">
                  <input type="text" id="drawing_Internal_id" name="drawing_Internal_id" disabled lay-verify="required"  autocomplete="off" class="layui-input" value="{$createId}">
                  <p id="pLog" style="color:red"></p>
              </div>
          </div>
            <script>
            </script>
          <div class="layui-form-item">
              <label for="remark" class="layui-form-label">备注</label>
              <div class="layui-input-inline">
                  <input type="text" id="remark" name="remark" autocomplete="off" class="layui-input">
              </div>
          </div>
            <!--<div class="layui-form-item">-->
                <!--<label for="create_name" class="layui-form-label">创建人</label>-->
                <!--<div class="layui-input-inline">-->
                    <!--<input type="text" id="create_name" name="create_name" lay-verify="required" autocomplete="off" value="杨世晖"  disabled class="layui-input">-->
                <!--</div>-->
            <!--</div>-->
          <div class="layui-form-item">
              <label class="layui-form-label"></label>
              <button class="layui-btn" lay-submit lay-filter="addId" >
                  增加
              </button>
          </div>
      </form>
    </div>
    <script>
         layui.use(['form'], function(){
           $ = layui.jquery;
           var form = layui.form,layer = layui.layer;

           //监听提交
           form.on('submit(addId)', function(data){
             //console.log(data);
               $.post("{:url('index/Internal/internalAdd')}",data.field,function(info){
                   if (info) {
                       layer.alert("添加成功", {icon: 6},function () {
                           window.parent.location.reload();  //刷新父级页面
                           // 获得frame索引
                           var index = parent.layer.getFrameIndex(window.name);
                           //关闭当前弹出层
                           parent.layer.close(index);
                       });
                   }else{
                       layer.alert("添加失败", {icon: 5});
                   }
               },'json');
               return false;
           });


         });
    </script>

  </body>

</html>